<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<%@ include file="../general/header.jsp" %>
<script type="text/javascript">$($.date_input.initialize);</script>
	<div id="header">Forgot Password - Second Step</div>
	<%@ include file="../general/menu.jsp" %>	
	<div id="content">
		<form method="POST" action="../user/forgotPassword2">
			<input type="hidden" name="userId" value="<c:out value='${lostuser.id}'/>" />
			<span>Question: </span>
			<span><c:out value="${lostuser.question}"/> </span>
			
			<span>Answer: </span>
			<input type="text" name="answer" value="<c:out value='${answer}'/>" /><br />
			
			<input type="submit" value="Continue" />
		</form>
		<c:if test="${!empty verifyAnswer}">
			<c:if test="${verifyAnswer==true}">
				<span>Your password is <c:out value="${lostuser.password}"/></span>
			</c:if>
			<c:if test="${verifyAnswer==false}">
				<span>Wrong answer</span>
			</c:if>
		</c:if>			
		
	</div>
	<br/>
	<div id="bottom">
		<span class="inline spaced">
			<a class="color" href="../general/index">Go back to index</a>
		</span>
	</div>
	<%@ include file="../general/footer.jsp" %>